##条件语句

def get_member_level(M, S):
    """根据消费金额(M)和积分(S)评定会员等级"""
    if M >= 1000 or S >= 10000:
        return '钻石会员'
    elif 500 <= M < 1000 and 5000 <= S < 10000:
        return '白金会员'
    elif 200 <= M < 500 and 2000 <= S < 5000:
        return '黄金会员'
    elif 100 <= M < 200 and 1000 <= S < 2000:
        return '白银会员'
    elif 500 <= S < 1000:
        return '青铜会员'
    else:
        return '普通会员'

def input_positive_number(prompt):
    """获取正数输入，支持异常处理"""
    while True:
        try:
            num = float(input(prompt))
            if num >= 0:
                return num
            else:
                print("输入不能为负数，请重新输入！")
        except ValueError:
            print("输入格式错误，请输入数字！")

if __name__ == "__main__":
    print("===== 会员等级评定系统 =====")
    # 手动输入消费金额和积分
    M = input_positive_number("请输入消费金额（元）：")
    S = input_positive_number("请输入当前积分（分）：")
    
    # 计算并显示结果
    level = get_member_level(M, S)
    print(f"\n您的消费金额为：{M}元，当前积分为：{S}分")
    print(f"您的会员等级是：{level}")